package com.shanshan.system.controller;

import com.shanshan.system.service.MeetingClassService;
import com.shanshan.system.vo.PeriodContent;
import com.shanshan.system.vo.Result;
import com.shanshan.system.vo.UpdateMeetingClass;
import com.shanshan.system.vo.UpdateUsed;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author keluoyisi
 * @program: shanshan
 * @description:
 * @date 2023-02-09 21:07:02
 */
@RestController
@RequestMapping("/system/meetingClass")
@SuppressWarnings("all")
public class MeetingClassController {
    @Autowired
    private MeetingClassService studyService;

    @PostMapping("/updateUsed")
    public Result updateUsed(@RequestBody UpdateUsed updateUsed){
        return studyService.updateUsed(updateUsed);
    }
    @PostMapping("/list")
    public Result selectMeetingClassAll(@RequestParam(defaultValue = "1") int currentPage, @RequestParam(defaultValue = "5") int pageSize, @RequestBody PeriodContent periodContent ){
        System.out.println(periodContent);
        return studyService.selectMeetingClassAll(currentPage,pageSize,periodContent);
    }

    @PostMapping("/add")
    public Result addContent(@RequestBody UpdateMeetingClass updateMeetingClass){
       return studyService.addContent(updateMeetingClass);
    }

}
